﻿<metro:MetroWindow
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:metro="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:dc="clr-namespace:WPF.JoshSmith.Controls"
    xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
        xmlns:extToolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
    xmlns:gif="http://wpfanimatedgif.codeplex.com"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="IPS.VenueBuilder.MainWindow"
        Title="IPS Venue Builder" Height="600" Width="800"
        Closing="Window_Closing" Icon="appbar.edittext.rest.png">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="170" />
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0" Background="DarkGray">
            <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Name="scroller">
            <Grid Height="Auto" Width="Auto">
                <Grid VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Grid.LayoutTransform>
                            <ScaleTransform x:Name="scaler"/>
                        </Grid.LayoutTransform>
                        <Image VerticalAlignment="Top" HorizontalAlignment="Left" x:Name="background" Stretch="None" />
                <dc:DragCanvas  x:Name="dragcanvas"/>
                </Grid>
            </Grid>
            </ScrollViewer>
        </Grid>
        <StackPanel HorizontalAlignment="Right" Margin="0,20,20,0" Orientation="Horizontal" VerticalAlignment="Top" Height="50">
        	<Button Click="Button_Click_1" IsEnabled="false" x:Name="addlampbtn" Width="50" Margin="0,0,5,0" BorderThickness="0" Padding="0" Grid.IsSharedSizeScope="True">
        		<Image Source="Add.png"/>
        	</Button>
        	<Button  x:Name="button1" Click="button1_Click" Width="50" BorderThickness="0" Padding="0" >
        		<Image Source="Delete.png"/>
        	</Button>
    	</StackPanel>

        <Grid Grid.Column="1">
            <StackPanel Orientation="Vertical" Margin="5,0,0,0">
                <Expander Header="Load Plan"  IsExpanded="True">
            		<Grid Margin="10,10,0,10">
            			<StackPanel Orientation="Vertical" Margin="0,0,10,0" d:LayoutOverrides="Height">
            				<Button Click="Button_Click_2" Content="From File"/>
            				<ComboBox x:Name="servervenues" Margin="3,5,3,0" Background="#FFEBEBEB"/>
            				<Button Click="Button_Click_5" Content="From Server" x:Name="serverload" IsEnabled="False" Margin="0,5,0,0"/>
            			</StackPanel>
            		</Grid>
            	</Expander>
                <Expander Header="Venue Information" >
                	<Grid Margin="10">
                		<StackPanel Orientation="Vertical" Margin="0">
                			<Button Click="Button_Click" Content="Import Image"/>

                            <TextBox x:Name="venuename" TextChanged="venuename_TextChanged" Controls:TextboxHelper.Watermark="Venue Name" Margin="3,5,3,0" Controls:TextboxHelper.ClearTextButton="True"></TextBox>

                        </StackPanel>
                	</Grid>
                </Expander>
                <Expander x:Name="lampinfo" Header="Lamp Information"  IsEnabled="False">
                	<Grid Margin="0,10">
                		<Grid.RowDefinitions>
                			<RowDefinition Height="0.896*"/>
                			<RowDefinition Height="0.104*"/>
                		</Grid.RowDefinitions>
                		<StackPanel Margin="10,0" d:LayoutOverrides="Height">
                			<ComboBox  x:Name="lamptypes" VerticalAlignment="Top" HorizontalAlignment="Stretch" SelectionChanged="lamptypes_SelectionChanged" />
                			<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" Margin="0,5,0,0">
                				<Label Content="Channel"  x:Name="label1" VerticalAlignment="Top" />
                				<extToolkit:IntegerUpDown HorizontalAlignment="Right"  x:Name="channel" Width="90" />
                			</StackPanel>
                    
                			<StackPanel Orientation="Horizontal" Margin="0,5,0,0">
                				<Label Content="Used"  x:Name="label1_Copy" VerticalAlignment="Top" Margin="0" Width="53.013" />
                				<extToolkit:IntegerUpDown HorizontalAlignment="Right"  x:Name="used" Width="90" DefaultValue="1" Value="1" ValueChanged="used_ValueChanged" Minimum="1" Maximum="512" />
                    
                			</StackPanel>
                    
                			<CheckBox Content="Hidden from Public"  x:Name="checkBox1" Checked="checkBox1_Checked" Margin="0,5,0,0" />
                			<extToolkit:ColorPicker  x:Name="colorpicker" Margin="0,5,0,0"/>
                		</StackPanel>
                		<ScrollViewer VerticalContentAlignment="Stretch" Height="156" Margin="5,5,5,0" VerticalAlignment="Bottom" Grid.Row="1">
                			<UniformGrid x:Name="dmx" Columns="6" HorizontalAlignment="Stretch"/>
                		</ScrollViewer>
                	</Grid>
                </Expander>
                <Expander Header="Export">
                	<Grid Margin="10">
                		<StackPanel Orientation="Vertical" Margin="0" d:LayoutOverrides="Height">
                			<Button Click="Button_Click_3" Content="Save to File"/>
                			<Label x:Name="servern" Foreground="#FF00850E" Content="no servers found" Margin="3,0"/>
                			<Button Content="Upload to Server" Click="Button_Click_4" x:Name="upload" IsEnabled="false"/>
                		</StackPanel>
                	</Grid>
                </Expander>
                <Controls:ProgressRing IsActive="True" x:Name="progress" Visibility="Hidden" />
            </StackPanel>
        </Grid>
        <Grid />
        <Slider HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,20,20" TickPlacement="TopLeft" Minimum="1" Maximum="20" Value="10" ValueChanged="Slider_ValueChanged" Width="150"/>
    </Grid>
</metro:MetroWindow>
